package com.arnold.test.actions

import org.apache.spark.{SparkConf, SparkContext}

/**
  * Created by arnold.zhu on 2017/7/18.
  */
object Count {

  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local").setAppName("Spark01Learn")
    val sc = new SparkContext(conf)

    // 根据scala集合创建rdd数据集
    val rdd = sc.parallelize(1 to 100)

    println(rdd.filter(_ % 3 == 0).count())
  }

}
